<?php
//edited
require("configuration.php");
require_once('functions.php');


if($_GET['option']!='users'&&!checkRegistration()) { 
	if(count($_GET)){
		header("Location: index.php");
		exit;
	}else {
		$_GET['option']='users';
		$_GET['task']='login';
	}

}

if($_GET["option"]=="users"){
	include("components/users/index.php");
	exit;
}


if($_GET["option"]=="mainpage"){
	include("components/mainpage/index.php");
	exit;
}else if($_GET["option"]=="statistics"){
	include("components/statistics/index.php");
	exit;
}else if($_GET["option"]=="test"){
	include("components/test/index.php");
	exit;
}else if($_GET["option"]=="settings"){
	include("components/settings/index.php");
	exit;
}else{
	include("components/mainpage/index.php");
	exit;
}
?>